package com.tul.exercise.base.thread.synchronize;

import com.tul.cusa.common.log.LogTracerFactory;
import com.tul.cusa.common.log.intf.ILogTracer;

import java.util.concurrent.Semaphore;

/**
 *
 */
public class CustomCheckWindow {
    /**
     * 日志
     */
    private static final ILogTracer TRACER = LogTracerFactory.getTracer(CustomCheckWindow.class);

    public static void main(String[] args) {

    }

    /**
     *
     */
    private static class SecurityCheckThread extends Thread {
        /**
         * 序列号
         */
        private int seq;

        /**
         * 信号量
         */
        private Semaphore semaphore;

        public SecurityCheckThread(int seq, Semaphore semaphore) {
            this.seq = seq;
            this.semaphore = semaphore;
        }

        @Override
        public void run() {

            try {
                semaphore.acquire();
            }catch (Exception e) {
                TRACER.error("异常", e);
            }


        }

    }


}


